#!/usr/bin python
# -*- coding: utf-8 -*-
# @Time    : 2023/2/7 9:36
# @Author  : hhr


from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from correspondence import routing

application = ProtocolTypeRouter({
    'websocket': AuthMiddlewareStack(
        URLRouter(
            routing.websocket_urlpatterns  # 指明路由文件是django_websocket/routing.py,类似于路由分发
        )
    ),
})
